const shake = function debounce (fn,timeout) {
    let _time = null
    return function () {
        let _arg = arguments
        clearTimeout(_time)
        _time = setTimeout(() => {
            fn.call(this, ..._arg)
        }, timeout)
    }
}

export default shake